
/**
 * 使用方法:
 *   var map = new Map();
 *   map.put("基本工资",100);
 *   alert(map.get("基本工资"));
 */
Map = function(){
	this.obj = {};
	this.keySet = [];
}

Map.prototype={
	put:function(key,value){
		//this.map.key = value;
		this.obj[key] = value;
		this.keySet.push(key);
	},
	get:function(key){
		//return this.obj.key;
		return this.obj[key];
	},
	iterator:function(){//遍历
		for(var key in this.obj){
			alert("key = " + key + " , value = " + this.obj[key]);
		}
	},
	setMap:function(map){
		this.obj = map;
	},
	getMap:function(){
		return this.obj;
	}
}